]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: show spinner animation for busy applications
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 3 Apr 2013 18:18:43 +0000 (14:18 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Fri, 19 Apr 2013 17:54:56 +0000 (13:54 -0400)
When the active application signals its busy state, we now will show a
spinner on the panel, next to the application name.

https://bugzilla.gnome.org/show_bug.cgi?id=697207

js/ui/panel.js

index 303e24169414bb2d97e8d33e263a57ca70f3b355..5d2952cf77f486e53b55e912cf2cd4b21dcbfbc4 100644 (file)
@@ -566,9 +566,14 @@ const AppMenuButton = new Lang.Class({
         }
 
         if (targetApp == this._targetApp) {
-            if (targetApp && targetApp.get_state() != Shell.AppState.STARTING) {
+            if (targetApp &&
+                targetApp.get_state() != Shell.AppState.STARTING &&
+                targetApp.get_state() != Shell.AppState.BUSY) {
                 this.stopAnimation();
                 this._maybeSetMenu();
+            } else if (targetApp &&
+                       targetApp.get_state() == Shell.AppState.BUSY) {
+                this.startAnimation();
             }
             return;
         }
@@ -601,7 +606,8 @@ const AppMenuButton = new Lang.Class({
         this._iconBox.set_child(icon);
         this._iconBox.show();
 
-        if (targetApp.get_state() == Shell.AppState.STARTING)
+        if (targetApp.get_state() == Shell.AppState.STARTING ||
+            targetApp.get_state() == Shell.AppState.BUSY)
             this.startAnimation();
         else
             this._maybeSetMenu();